CC = gcc
CFLAGS = -fPIC
LDFLAGS = -shared -ldl

TARGET = open_hook.so
SOURCE = open_hook.c

.PHONY: all clean test

all: $(TARGET)

$(TARGET): $(SOURCE)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<

clean:
	rm -f $(TARGET)